1. Field of the Invention
The present invention relates to a technique for detecting the movement of an object through image processing, and to a technical field of a recording apparatus.
2. Description of the Related Art
When performing printing on a medium such as a print sheet while it is being conveyed, a low conveyance precision causes an uneven density of a halftone image or a magnification error, resulting in degraded quality of a printed image. Therefore, although recording apparatuses employ high-precision components and carry an accurate conveyance mechanism, there is a strong demand for higher print quality and higher conveyance precision. At the same time, there is also a strong demand for cost reduction. The achievement of both higher precision and lower cost is demanded.
To meet this demand, an attempt is made to detect the movement of a medium with high precision to achieve stable conveyance through feedback control. A method used in this attempt, also referred to as direct sensing, images the surface of the medium to detect through image processing the movement of the medium being conveyed.
Japanese Patent Application Laid-Open No. 2007-217176 discusses a method for detecting the movement of the medium. The method in Japanese Patent Application Laid-Open No. 2007-217176 images the surface of a moving medium a plurality of times in a time sequential manner by using an image sensor, and compares acquired images through pattern matching to detect an amount of movement of the medium. Hereinafter, a method for directly detecting the surface of an object to detect its moving state is referred to as direct sensing, and a detector employing this method is referred to as a direct sensor.
With direct sensing, a template pattern is extracted from first image data, and an area having a large correlation with the template pattern is sought among areas in second image data through image processing. In this process, a pattern which is identical or very similar to a certain template pattern may exist at a plurality of positions within a seek range. In this case, if a wrong position among the plurality of positions is determined in pattern matching, a detection error results. Therefore, for high-precision direct sensing, a template pattern becomes a unique pattern within the seek range.